{% extends 'base.html' %}
{% load staticfiles %}
{% block article_content %}
<article>
	<div class="l_box f_l">

	<h3>
	{% if user.is_authenticated %}
	<a href="{% url 'user_detail' %}?tag_id=1">我的信息</a>&nbsp|&nbsp<a href="{% url 'user_detail' %}?tag_id=2">我的博客</a>&nbsp|&nbsp<a href="{% url 'user_detail' %}?tag_id=3">添加博客</a>
	</h3>

	{% if tag_id == 1 %}
	<br>
	<div style="font-size:20px">
	<p>用户名：{{user.username}}</p>
	<br>
	<p>qq:{{user.qq}}</p>
	<br>
	<p>mobile:{{user.mobile}}</p>
	<br>
	<p>url:{{user.url}}</p>
	<br>
	<p>email:{{user.email}}</p>
	</div>
	{% endif %}

	{% if tag_id == 2 %}
	{% include 'topnews.html' %}
	{% endif %}

	{% if tag_id == 3 %}
		<form action="{% url 'article_update' article.id%}" method="post">
			{% csrf_token %}
			{{ article_form.as_p }}
			<input type="submit" value="submit">
		</form>
	{% endif %}

	
	{%else%}
	<h3><a href="{% url 'login' %}">去登录</a>|<a href="{% url 'regist' %}">去注册</a></h3>
	{% endif %}


	</div>
	{% include 'right.html' %}
</article>
{% endblock %}
